<script setup>
import { inject } from 'vue'
const money = inject('money')
const saveMoney = inject('saveMoney')
</script>

<template>
  <div class="child-page" style="padding: 50px; border: 10px solid #ccc">
    child 组件 --钱包{{ money }} <button @click="saveMoney(1000)">存点钱</button>
  </div>
</template>